﻿using System.Collections.Generic;

namespace PgBirdie.Core.Service.Infrastructure
{
    public interface IFileSystemService
    {
        IList<string> GetDirectoryNames(string path);

        IList<string> GetFilenames(string path);

        IList<string> GetLastSegmentsFromPaths(IEnumerable<string> paths);

        /// <summary>
        /// Create file with content as UTF-8 with/without BOM.
        /// </summary>
        bool CreateFile(string path, string text, bool withBom);

        /// <summary>
        /// Read file contents as UTF-8 with BOM.
        /// </summary>
        string ReadFile(string path);

        void DeleteDirectory(string path);

        void DeleteFile(string path);
    }
}